package com.asset.dispoal.business.appoint.service.command;

import com.asset.dispoal.business.appoint.domain.db.mapper.AppointMapper;
import com.asset.dispoal.business.appoint.dto.QueryAppointCaseRequest;
import com.asset.dispoal.business.bsCase.dto.BsCaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.mhuang.pacebox.core.ddd.BaseCommand;
import tech.mhuang.pacebox.springboot.protocol.Result;

import java.util.List;

@Component
public class QueryAppointDetailCommand implements BaseCommand<QueryAppointCaseRequest, Result<List<BsCaseResponse>>> {
    @Autowired
    AppointMapper appointMapper;

    @Override
    public Result<List<BsCaseResponse>> execute(QueryAppointCaseRequest request) {
        return Result.ok(appointMapper.queryDetailByAppoint(request));
    }
}
